/*=============================================================================
#    The element-comm is a tentative program used to test our ideas.           
#                       Copyright (C)  bgao                                    
#
#     This program is free software; you can redistribute it and/or            
#      modify it under the terms of the GNU General Public License             
#     as published by the Free Software Foundation; either version 2           
#         of the License, or (at your option) any later version.               
#
#     This program is distributed in the hope that it will be useful,          
#    but WITHOUT ANY WARRANTY; without even the implied warranty of           
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            
#             GNU General Public License for more details.                    
#
#    You should have received a copy of the GNU General Public License        
#     along with this program; if not, write to the Free Software             
#      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,             
#                       MA  02110-1301, USA.                                  
#==============================================================================
# $Id$ 
#
# $Author$ 
#
# $Revision$ 
#
# $Date$ 
#
# Description: 
#
=============================================================================*/
#include "rtos-wsn.h"
#include 	"wsn-taskid.h"

//extern void delay_ticks (int ticks);


int Wsn_TestTask1(int event)
{
	wsn_RequestResource(1,TEST_TASK1ID);
	/** Wsn_TestTask1 Scheduled **/
	WSN_debug(0x02d5, 0);
	/** Wsn_TestTask1 Over **/
	WSN_debug(0x02d6, 0);
	wsn_ReleaseResource(TEST_TASK1ID);	
    return 1;
}




int Wsn_TestTask2(int event)
{
	/** Wsn_TestTask2 Scheduled **/
	WSN_debug(0x02d7, 0);
	/** Wsn_TestTask2 Over **/
	WSN_debug(0x02d8, 0);

    return 1;
}




int Wsn_TestTask3(int event)
{
	/** Wsn_TestTask3 Scheduled **/
	WSN_debug(0x02d9, 0);
	wsn_RequestResource(1,TEST_TASK3ID);
    /** NewTask testtask2 **/
    WSN_debug(0x02c7, 0);	
	WSN_NewTask(TEST_TASK2ID, 0, 0);
    /** NewTask testtask1 **/
    WSN_debug(0x02c6, 0);
	WSN_NewTask(TEST_TASK1ID, 0, 0);
    /**  Wsn_TestTask3 Release resource **/
    WSN_debug(0x02c5, 0);
	wsn_ReleaseResource(TEST_TASK3ID);
	/** Wsn_TestTask3 Over **/
	WSN_debug(0x02da, 0);

    return 1;
}

